package com.connector.base.connection.channel;

import com.corundumstudio.socketio.SocketIOClient;

import java.util.Objects;

public class SocketIoSocketChannel implements SocketChannel
{
    private final SocketIOClient socketIOClient;

    public SocketIoSocketChannel(final SocketIOClient socketIOClient) {
        this.socketIOClient = socketIOClient;
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || this.getClass() != o.getClass()) {
            return false;
        }
        final SocketIoSocketChannel that = (SocketIoSocketChannel)o;
        return Objects.equals(this.socketIOClient, that.socketIOClient);
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.socketIOClient);
    }

    public SocketIOClient getSocketIOClient() {
        return this.socketIOClient;
    }
}
